#pragma once
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h" // must be included
#include "spdlog/sinks/stdout_sinks.h"

namespace Orange
{
    class Log
    {

    public:
        static void Init();
        inline static std::shared_ptr<spdlog::logger> &GetCoreLogger() { return m_Core_Logger; };
        inline static std::shared_ptr<spdlog::logger> &GetClientLogger() { return m_Client_Logger; };

    private:
        static std::shared_ptr<spdlog::logger> m_Core_Logger;
        static std::shared_ptr<spdlog::logger> m_Client_Logger;
    };

}

#define ORANGE_CORE_TRACE(...) ::Orange::Log::GetCoreLogger()->trace(__VA_ARGS__)
#define ORANGE_CORE_WARN(...) ::Orange::Log::GetCoreLogger()->warn(__VA_ARGS__)
#define ORANGE_CORE_ERROR(...) ::Orange::Log::GetCoreLogger()->error(__VA_ARGS__)
#define ORANGE_CORE_INFO(...) ::Orange::Log::GetCoreLogger()->info(__VA_ARGS__)

#define ORANGE_TRACE(...) ::Orange::Log::GetClientLogger()->trace(__VA_ARGS__)
#define ORANGE_WARN(...) ::Orange::Log::GetClientLogger()->warn(__VA_ARGS__)
#define ORANGE_ERROR(...) ::Orange::Log::GetClientLogger()->error(__VA_ARGS__)
#define ORANGE_INFO(...) ::Orange::Log::GetClientLogger()->info(__VA_ARGS__)